﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<CourseSystem.Core.Entities.ExaminationInfo>" %>

<%@ Import Namespace="Chowpoo.Util" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    考试监考
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% var doingCount = ViewData["doing"].CheckInt(0);
       var doneCount = ViewData["done"].CheckInt(0);
       var allCount = StudentBLL.GetList(0, 0, 0, Model.ClassId, Model.YearId, "", "").Count();
       var warnCount = ViewData["warn"].CheckInt(0);
    %>
    <table width="907" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="25" background="<%=ResolveUrl("~/Content/Admin/images/a_01.gif") %>">
            </td>
        </tr>
        <tr>
            <td height="170">
                <table width="907" height="170" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="21" background="<%=ResolveUrl("~/Content/Admin/images/a_02.gif")%>">
                        </td>
                        <td width="276" align="center" valign="top" bgcolor="#FFFFFF">
                            <table width="200" height="150" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td height="20" align="center" valign="middle" bgcolor="#FFFFFF">
                                        <span class="stylenew1">离考试结束时间还有</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="40" align="center" id="countDownTd">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="40" align="center">
                                        <%=Html.ActionButton("全体警告", "ExamWarnAll", new {eid=Model.Id })%>
                                        <%=Html.ActionButton("全体交卷", "ExamEnforceAll", new { eid = Model.Id })%>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="610" valign="top" background="<%=ResolveUrl("~/Content/Admin/images/a_04.gif")%>"
                            class="stylenew4">
                            <table width="568" height="155" border="0" align="center" cellpadding="0" cellspacing="0">
                                <%using (Ajax.BeginForm("ExamStatusListUc", new { eid = Model.Id }, new AjaxOptions { HttpMethod = "Get", UpdateTargetId = "listDiv" }))
                                  { %>
                                <tbody>
                                    <tr>
                                        <td style="height: 5px" colspan="3">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height: 25px" class="stylenew4" width="40%" scope="col">
                                            考&nbsp;&nbsp;&nbsp;&nbsp;试: <span id="lbl_ExamName">
                                                <%=Model.Title %></span>
                                        </td>
                                        <td style="height: 25px" class="stylenew4" width="21%" scope="col">
                                            在考人数:
                                            <label id="lbl_strAttendNum" class="stylenew30" onclick="QueryCurrAttExaminee();">
                                                <%=doingCount %></label>
                                            &nbsp;人
                                        </td>
                                        <td class="stylenew4" colspan="5" scope="col" align="left">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="stylenew4" width="40%" scope="col">
                                            科&nbsp;&nbsp;&nbsp;&nbsp;目: <span id="lbl_ExamSubject">
                                                <%=CourseSettingBLL.Get().CourseName %></span>
                                        </td>
                                        <td class="stylenew4" width="21%" scope="col">
                                            缺席人数:
                                            <label id="lbl_strMissExamNum" class="stylenew30" onclick="QueryMissExaminee();">
                                                <%=allCount-doingCount-doneCount %></label>
                                            &nbsp;人
                                        </td>
                                        <td width="35%" class="stylenew4" style="text-align: left; height: 25px" scope="col">
                                            <div align="right">
                                                考&nbsp;&nbsp;&nbsp;&nbsp;生:
                                                <input style="text-align: left; width: 130px" id="txt_ExamineeName" name="name">
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left; height: 25px" class="stylenew4" width="40%" scope="col">
                                            专&nbsp;&nbsp;&nbsp;&nbsp;业: <span id="lbl_ExamRegion">
                                                <%=Model.ClassInfo.SubjectInfo.Name %></span>
                                        </td>
                                        <td class="stylenew4" width="21%" scope="col">
                                            交卷人数:
                                            <label id="lbl_strSubmitNum" class="stylenew30" onclick="QuerySubmitExaminee();">
                                                <%=doneCount %></label>
                                            &nbsp;人
                                        </td>
                                        <td style="text-align: left; height: 21px; vertical-align: middle" class="stylenew4"
                                            scope="col">
                                            <div align="right">
                                                学&nbsp;&nbsp;&nbsp;&nbsp;号:
                                                <input style="width: 130px" id="txt_ExamineeSN" class="TextGraySoild " name="uid">
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: left; height: 25px" class="stylenew4" width="40%" scope="col">
                                        </td>
                                        <td class="stylenew4" width="21%" scope="col">
                                            全体考生:
                                            <label id="lbl_strAllUserNum" class="stylenew30" onclick="QueryAllExaminee();">
                                                <%=allCount %></label>
                                            &nbsp;人
                                        </td>
                                        <td class="stylenew4" align="right">
                                            <input type="submit" style="width: 130px;" value="点击搜素考生" id="btnQuery" />
                                        </td>
                                    </tr>
                                    <tr>
                                    </tr>
                                    <tr>
                                    </tr>
                                    <tr>
                                    </tr>
                                    <tr>
                                        <td style="height: 10px" colspan="5">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </tbody>
                                <%} %>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="907" height="17" align="left">
                <table height="17" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="21" background="<%=ResolveUrl("~/Content/Admin/images/a_02.gif")%>">
                        </td>
                        <td width="860" align="center" bgcolor="#E0E0E0">
                            <span class="stylenew12">温馨提示：考生人数<span class="stylenew8"><%=allCount %></span>，已交卷人数<span
                                class="stylenew8"><%=doneCount %></span>，警告人数<span class="stylenew8"><%=warnCount %></span>，<span
                                    class="stylenew10">绿色</span>代表已交卷，<span class="stylenew13">黄色</span>代表被警告</span>
                        </td>
                        <td width="26" background="<%=ResolveUrl("~/Content/Admin/images/a_22.gif")%>">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table width="907" height="513" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td width="21" background="<%=ResolveUrl("~/Content/Admin/images/a_02.gif")%>">
            </td>
            <td id="listDiv" width="860" height="513" align="center" valign="top" bgcolor="#FFFFFF">
                <%Html.RenderAction("ExamStatusListUc", new { eid = Model.Id }); %>
            </td>
            <td width="26" background="<%=ResolveUrl("~/Content/Admin/images/a_22.gif")%>">
            </td>
        </tr>
    </table>
    <table width="907" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td background="<%=ResolveUrl("~/Content/Admin/images/a_24.gif")%>">
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <style type="text/css">
        .stylenew1 { font-size: 14px; font-weight: bold; font-family: "宋体"; color: #BC7E3F; }
        .stylenew2 { font-size: 36px; font-family: "宋体"; color: #0000FF; font-weight: bold; }
        .stylenew3 { font-size: 18px; }
        .stylenew4 { font-size: 12px; font-family: "宋体"; }
        .stylenew8 { color: #FF0000; }
        .stylenew10 { color: #33CC66; }
        body { background-color: #E9E3D9 !important; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; }
        .stylenew12 { font-size: 12px; }
        .stylenew13 { color: #FFCC33; }
    </style>
    <script src="<%=ResolveUrl("~/Scripts/jquery.jcountdown1.3.min.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#countDownTd").countdown({
                date: strToTime('<%=Model.EndTime.ToString("yyyy-MM-dd HH:mm:ss") %>'), //Counting TO a date
                htmlTemplate: "<span class=\"stylenew2\">%{h}<span class=\"stylenew3\">时</span>%{m}<span class=\"stylenew3\">分</span>%{s}<span class=\"stylenew3\">秒</span></span>",
                //date: "july 1, 2011 19:24", //Counting TO a date
                onChange: function (event, timer) {

                },
                onComplete: function (event) {
                    $(this).html("<span class=\"stylenew2 stylenew8\">已结束</span>");
                },
                leadingZero: true
            });
        });
    </script>
</asp:Content>
